<?php
require_once 'include.php';
require_once '_functions.php';

$admin = mysql_fetch_assoc(getAdmin($_SESSION['adminId']));

$application = mysql_fetch_assoc(getApplication($_GET['id'], $_SESSION['adminId']));
if ($application['applicationId'] == $_GET['id']) {
	$errors = getErrors($_GET['id']);
	
	echo '<table><tr><td colspan="2">Errors of application ' . $application['applicationName'] . ':</td></tr>';
	while ($e = mysql_fetch_assoc($errors)) {
		echo '<tr><td>' . $e['errorId'] . ':</td><td>' . $e['errorMessage'] . '</td></tr>';
	}
	echo '</td></tr></table>';
}